<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>过渡效果</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
		<script src="js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<style>
			#mydiv{
				width: 100px;
				height: 100px;
				background-color: red;
				-webkit-transition: width 2s;/*对当前浏览器支持*/
				transition: width 2s;
			}
			
			#mydiv:hover{
				width: 400px;
			}
		</style>
	</head>
	<body>
		<div id="mydiv">
			
		</div>
		
		<script>
			document.getElementById("mydiv").addEventListener("transitionend",function(e){
				this.innerHTML="过渡事件触发--过渡已完成"
			})
		</script>
	</body>
</html>
